import request from '@/utils/request'

export const UserApi = {
  /**
     *  管理员列表
     * @returns
     */
  getPage: (data) => {
    return request({
      url: '/manage/user/user/getPage',
      data,
      method: 'post'
    })
  },
  /**
     *  更新状态
     * @returns
     */
  updateStatus: (data) => {
    return request({
      url: '/manage/user/user/updateStatus',
      data,
      method: 'post'
    })
  },
  /**
     *  删除
     * @returns
     */
  delete: (uid) => {
    return request({
      url: '/manage/user/user/delete',
      params: { uid },
      method: 'get'
    })
  },

  /**
     *  重置密码
     * @returns
     */
  restPassword: (uid) => {
    return request({
      url: '/manage/user/user/restPassword',
      params: { uid },
      method: 'get'
    })
  },

  /**
     *  获取详细信息
     * @returns
     */
  getInfoByUid: (uid) => {
    return request({
      url: '/manage/user/user/getInfoByUid',
      params: { uid },
      method: 'get'
    })
  },

  /**
     *  获取用户列表
     * @returns
     */
  getList: (params) => {
    return request({
      url: '/manage/user/user/getList',
      data: params,
      method: 'get'
    })
  },

  /**
     *  更新
     * @returns
     */
  update: (data) => {
    return request({
      url: '/manage/user/user/update',
      data,
      method: 'post'
    })
  },

  /**
     *  插入
     * @returns
     */
  insert: (data) => {
    return request({
      url: '/manage/user/user/insert',
      data,
      method: 'post'
    })
  }

}
